const store = {
    namespaced: true,
    state: {
        count: 0,
        login_user: {objectId: "", name: ""},
        login_shop: {
            "name": "",
            "password": "",
            "defaultShopId": "",
            "objectId": "",
            "createdAt": "",
            "updatedAt": "",
            "shop": {
                "desc": "",
                "name": "",
                "userId": "",
                "imageId": "",
                "shopUrl": "",
                "objectId": "",
                "createdAt": "",
                "updatedAt": "",
                shopImage: {
                    url: "",
                    width: 0,
                    height: 0
                }
            }
        },
        tabActive:"热卖中"
    },
    mutations: {
        snapShot(state, payload) {
            var keys = Object.keys(payload)
            keys.map(key => {
                state[key] = payload[key]
            })
            return state
        }
    }
}
export default store